package com.itheima.API;

import java.util.Scanner;

public class Spring1 {
    //数组字符串输出
    public static String arrayPrint(int[] arr) {
        String s = "";
        s += "[";
        for (int i = 0; i < arr.length; i++) {
            if (i == arr.length - 1) {
                s += arr[i];
            } else {
                s += arr[i];
                s += ",";
            }
        }
        s += "]";
        return s;
    }

    //字符串反转
    public static String arrayFan(String s) {
        String a = "";
        for (int i = s.length() - 1; i >= 0; i--) {
            a += s.charAt(i);
        }
        return a;
    }

    public static void main(String[] args) {
        String s1 = "abc";
        String s2 = "ab";
        String s3 = s2 + "c";
        System.out.println(s1 == s3);

        System.out.println(arrayFan(s1));

        int[] arr = {1, 2, 3};
        String s = arrayPrint(arr);
        System.out.println(s);


        Scanner sc = new Scanner(System.in);
        String a = sc.nextLine();
        int bigCount = 0;
        int smallCount = 0;
        int numberCount = 0;

        for (int i = 0; i < a.length(); i++) {
            System.out.print(a.charAt(i));
            if (a.charAt(i) > 'A' && a.charAt(i) < 'Z') {
                bigCount++;
            } else if (a.charAt(i) > 'a' && a.charAt(i) < 'z') {
                smallCount++;
            } else {
                numberCount++;
            }

        }
        System.out.println("大写" + bigCount + "  小写 " + smallCount + "  数字" + numberCount);
    }
}
